import { deleteRequest, getRequest, postRequest, putRequest } from '@/utils/request.js'

export const examApi = {
  // 考试
  examPage: (data) => {
    return getRequest('/v1/admin/exam/page', data)
  },
  examView: (data) => {
    return getRequest('/v1/admin/exam/view', data)
  },
  examPublish: (data) => {
    return putRequest('/v1/admin/exam/edit/publish/status', data)
  },
  examSort: (data) => {
    return putRequest('/v1/admin/exam/sort', data)
  },
  examDelete: (data) => {
    return deleteRequest('/v1/admin/exam/delete', data)
  },
  examMockSave: (data) => {
    return postRequest('/v1/admin/exam/save/mock', data)
  },
  examMockEdit: (data) => {
    return putRequest('/v1/admin/exam/edit/mock', data)
  },
  examRegistrationSave: (data) => {
    return postRequest('/v1/admin/exam/save/registration', data)
  },
  examRegistrationEdit: (data) => {
    return putRequest('/v1/admin/exam/edit/registration', data)
  },
  examRegistrationPostponement: (data) => {
    return putRequest('/v1/admin/exam/postponement', data)
  },
  examRegistrationBatchSubmitLate: (data) => {
    return putRequest('/v1/admin/exam/submit/late/batch', data)
  },
  // 统计-概况
  examStatistics: (data) => {
    return getRequest('/v1/admin/exam/data/statistics', data)
  },
  // 考生列表
  examUserPage: (data) => {
    return getRequest('/v1/admin/exam/data/user/page', data)
  },
  // 考生考试列表
  examUserRecordPage: (data) => {
    return getRequest('/v1/admin/exam/data/record/page', data)
  },
  // 考生考试批阅开始
  examEvaluationStart: (data) => {
    return getRequest('/v1/admin/exam/data/evaluation/start', data)
  },
  // 考生考试批阅结束
  examEvaluationEnd: (data) => {
    return putRequest('/v1/admin/exam/data/evaluation/end', data)
  },
  // 考生考试批阅状态设置
  examEvaluationStatus: (data) => {
    return putRequest('/v1/admin/exam/data/evaluation/update/status', data)
  },
  // 考生考试批阅答案修改
  examEvaluationAnswer: (data) => {
    return putRequest('/v1/admin/exam/data/evaluation/update/answer', data)
  },
  // 批阅考生列表
  examEvaluationList: (data) => {
    return getRequest('/v1/admin/exam/data/evaluation/list', data)
  },
  // 题目分析
  examAnalysis: (data) => {
    return getRequest('/v1/admin/exam/data/question/analysis/page', data)
  },
  // 题目分析明细
  examAnalysisDetail: (data) => {
    return getRequest('/v1/admin/exam/data/question/analysis/detail/page', data)
  },
  // 排行榜
  examRankPage: (data) => {
    return getRequest('/v1/admin/exam/data/rank/page', data)
  },
  // 用户所有的考试
  userExamPage: (data) => {
    return getRequest('/v1/admin/exam/data/personal/page', data)
  }
}
